<template>
  <div class="layout">
    <Header></Header>
    <slot></slot>
    <Footer />

    <div class="coming-mask flex-center column" v-if="mask">
      <p>正在开发中</p>
      <p>预计5月与您见面</p>

      <div class="admin" @click="handleCloseMask">关闭</div>
    </div>
  </div>
</template>

<script setup>
import Footer from "./footer.vue";
import Header from "./header.vue";

const mask = ref(true);

const handleCloseMask = () => {
  mask.value = false;
  localStorage.setItem('COMING-MASK', 'YES')
};

onMounted(()=>{
  mask.value = localStorage.getItem('COMING-MASK') ? false : true
})
</script>

<style lang="scss" scoped>
.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.coming-mask {
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  font-size: 50px;
  font-weight: 800;
  color: white;

  .admin {
    position: absolute;
    right: 20px;
    top: 0;
    color: transparent;
  }
}
</style>
